%loadBaseCoor(option)
%   In case the files 'baseCoor.mat' does not exist or it has to be
%   refreshed this function will create a new version of the file. This
%   function can be forced by adding the option 'force' (as a string).

function loadBaseCoor(option)
% In case it doesn't exist, this function creates a baseCoor.mat file 
% containing all the normal coordination numbers for the 
% 'organic elements'. This is needed to calculate the amount of H 
% in case of implicit use of hydrogen atoms.
% This function is used during startup.
%%

if (exist('option','var') == 1 && strcmp(option,'force')) || ~(exist('baseCoor.mat','file') == 2);
    baseCoor = {'B',3; 'C',4; 'N',[3 5]; 'O',2; 'P',[3 5]; 'S',[2 4 6]; ...
        'F',1; 'Cl',1; 'Br',1; 'I',1};
    save('.\Core\temp\baseCoor.mat','baseCoor')
end

end